Ext.namespace("SMeeting.Main");

SMeeting.Main.tabIndex = {
	"toimp" : 0,
	"toimportant" : 1,
	"tofeedback" : 2,
	"tofulfill" : 3,
	"search" : 4
};
SMeeting.Main.tabs = [];

SMeeting.initUI = function() {
	var opentab = Utils.getParameter('opentab');
	if (!opentab) opentab = "toimp";	
	// init tabs
	SMeeting.Main.tabs.push(new SMeeting.ToImp());	
	//SMeeting.Main.tabs.push(new SMeeting.ToImportant());
	SMeeting.Main.tabs.push(new SMeeting.ToFeedback());	
	SMeeting.Main.tabs.push(new SMeeting.ToFulfill());
	SMeeting.Main.tabs.push(new SMeeting.Search());	
	SMeeting.instance = new Ext.TabPanel({
		region: 'center',
		activeTab: SMeeting.Main.tabIndex[opentab],
		items: SMeeting.Main.tabs
	});
	
	var mainview = new Ext.Viewport({
        layout:'border',
        items:[SMeeting.instance]
    });
};

Ext.onReady(function(){
	Ext.QuickTips.init();
    Ext.BLANK_IMAGE_URL = '../resources/images/default/s.gif';
	SMeeting.initUI();
});

